import cv2
import numpy as np


img = cv2.imread("G:\Learn\CSDN\Work\\lena.jpg")
source=cv2.pyrDown(img)
cv2.imshow("Hello world", source)

B=source[:,:,0]
cv2.imshow("B",B)
G=source[:,:,1]
cv2.imshow("G",G)
R=source[:,:,2]
cv2.imshow("R",R)


img=cv2.imread("G:\Learn\CSDN\Work\\lena.jpg")
source=cv2.pyrDown(img)
cv2.namedWindow("Source")
cv2.imshow("Source",source)

gray=cv2.cvtColor(source,cv2.COLOR_BGR2GRAY)
cv2.namedWindow("Gray")
cv2.imshow("Gray",gray)

hsv=cv2.cvtColor(source,cv2.COLOR_BGR2HSV)
hsvChannels=cv2.split(hsv)
cv2.imshow("Hue",hsvChannels[0])
cv2.imshow("Saturation",hsvChannels[1])
cv2.imshow("Value",hsvChannels[2])


cv2.waitKey (0)
cv2.destroyAllWindows()
